package com.hzw.saas.web.admin.hpc.param;

import java.util.Date;
import javax.validation.constraints.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author sonam
 * @since 2021/2/25 15:28
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel("HPC-USER账号续期参数")
public class HpcAccountRenewalParam {

    @NotBlank(message = "续期的HPC-USER-ID不能为空")
    @ApiModelProperty(value = "续期的HPC-USER-ID")
    private String pid;

    @ApiModelProperty(value = "HPC总核时")
    private Double coreTimeTotal;

    @NotNull(message = "HPC续期核时不能为空")
    @Min(value = 0, message = "HPC续期核时大于0")
    @ApiModelProperty(value = "HPC续期核时")
    private Double coreTime;

    @ApiModelProperty(value = "赠送核时")
    private Double giveCoreTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Future(message = "设置的日期必须大于当前时间")
    @NotNull(message = "过期日期不能为空")
    @ApiModelProperty(value = "过期日期")
    private Date expireDate;

    @Pattern(regexp = "^([01])\\1*$", message = "请设置正确的数据")
    @ApiModelProperty(value = "无限算力,1-无限，0-有限")
    private String isInfinite;

}
